
import useUserStore from "@/store/modules/user"
let userStore = useUserStore()
export const isHasButton = (app: any) => {
  app.directive('has', {
    // 代表用到v-has自定义指令的组件挂载完毕时会执行一次,在tradeMark.vue中用到
    mounted(el: any, options: any) {
      if (!userStore.buttons.includes(options.value)) {
        el.remove()
      }
    }
  })
}